Chris Pollett > Old Classses >
CS116b/216

( Print View )

Student Corner:
  [Grades Sec1]
  [Submit Sec1]
  [Class Sign Up Sec1]
  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [Class Protocols]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]  [Quizzes]

Practice Exams:
  [Midterm]  [Final]

                           












HW#5 --- last modified February 07 2019 04:26:47..

Solution set.

Due date: May 7

Files to be submitted:
  Hw1.zip

Purpose: To experiment with winged-edge representation. To experiment with a simple particle system.

Related Course Outcomes:

The main course outcomes covered by this assignment are:

LO3 -- Be able to use a mesh data structure in a geometric modeling project.

LO7 -- Be able to create and use a simple particle system.

Specification:

The assignment below is only for the CS116b students in the class. CS216 students' grades for this assignment will be based on their final projects. CS 216 students will still submit their code for their project in a file Hw5.zip. Scores for CS216 will be split as follows. (1pt) coding guidelines for code, 3 pts in class presentation, 3pts in class demo, 3pts write-up and code of project (1.5 each). The write-up should be in a file write-up.pdf included in the ZIP folder you submit. The write-up of the project should describe what paper you used as the starting point of your project, what you coded and how it illustrates the technique described by the paper.

For CS116b students, for Hw5 you will code the Exploding, Epileptic Cube of DoomTM. First, I want you to implement the classes in class given for winged-edge representation. Then make a cube using this representation. When you launch your SDL application, it should draw this as a gray cube with edges of size 2 centered at the origin. The edges of the cube should be colored black, and the black ground of the scene is light blue. The viewpoint should be at +5 units along the z-axis, 2 units up. I don't care what light effects you use in the fragment shader. Once launched, your program should start an animation, at each phase in the animation the item being illustrated for that phrase should cycle through the three colors dark red, dark blue, and dark green for 1/4 of a second. The animation traverses each vertex among the vertices in your cube, it first flashes red, green, blue the vertex, it then flashes red, green, blue each edge connected to that vertex, it randomly picks an outgoing edge flashes it, flashes the two faces adjacent to that edge and proceeds to the vertex on the other side of that edge and repeats the process. Needly to say, this might appear quite nightmarish to someone with epilepsy. To solve this problem, the `b` key can be used to blow up your cube. When the `b` key is pressed, I would like your program to replace the cube with a particle system representing an explosion. The particles in this systems should shoot out randomly in all directions. Each particle should last a random amount of time between two and five seconds. The update step in the motion of the particles should occur in onLoop, and the drawing occur in onRender. A random number of particles might be generated in a given onLoop call. Particles need not interact with each other. Particles should continue to be generated while the `b` key is pressed. Six seconds after the `b` key is released, the system should reset itself and redraw the initial cube.

Point Breakdown

Code contributed to existing project is well-documented and follows the SJSU CS Department guidelines for C++1pt
Winged-edge representation classes implemented (each class 0.5pts).1.5pts
Cube drawn at initial position as described above1pt
Animation cycles through three colors as described1pt
Animation flashes vertices, edges, and faces as described (1 point for each).3pts
b key causes the cube to be replaced with the explosion sequence.0.5pts
Particle are generated while the b key is pressed (0.5pts), direction, number of particles generated is random and done in onLoop as well as a particle updates (1pt).1.5pts
Animation reset works as described1pt
Total10pts